<?php 
session_start();
require_once("include/authen.php");
require_once("include/ui.php");

if (!(isset($_POST['hBillNo'])) || $_POST['hBillNo'] ==""){
echo "<script>window.location='cancelbill.php'</script>";
}
	$title="Cancel Bill Detail";

	echo headerPage($title);
?>

<SCRIPT src="js/js_cancel_details.js"></SCRIPT> 
<script>
$(function() {
 
	$("#btnPrint").live('click',function(){
		$("#normal-screen").hide();
		$("#page-header").hide();
		$("#searchdata").hide();
		$(".toolbar-box").hide();
		$("#foolter_table").hide();
		$("#leftboder").hide();
		$("#rightboder").hide();
		window.print();
		
		$("#normal-screen").show();
		$("#page-header").show();
		$("#searchdata").show();
		$(".toolbar-box").show();
		$("#foolter_table").show();
		$("#leftboder").show();
		$("#rightboder").show();
	});	
});
</script>
<FORM name="Act" action="<?php echo $PHP_SELF?>" method="post"> 
<INPUT type=hidden value="<?php echo $_POST['hBillNo']?>" id="billno" name="billno"> 

<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" id='leftboder' style='border-left:2px solid #facb0c;'>&nbsp;</td>
    <td width="1004" valign="top">
        <div class="content-box">
            <div Class="toolbar-box">   
                <div class="t">
                    <div class="t">
                        <div class="t"></div>
                    </div>
                 </div>
                 <div class="m">
                    <div class="toolbar">
                        <table class="toolbar">
                        <tr>
								<!--td><a href="javascript:void('0');" id="btnConfirm">
									<span class="icon_check"></span>Confirm
									</a>
								</td-->
							<td><a href="cancelbill.php" id="btnBack">
									<span class="icon_back"></span>Back
									</a>
								</td>
															 <td>
								<a href="javascript:void('0');" title="Print" id="btnPrint">
								<span class="icon_Print"></span>Print
								</a>
							</td>
                        </tr>
                        </table>
                    </div>
                      <div class="header" style="background-image: url(images/script-delete.png);">
						<?php echo $title?>
                      </div>
                <div class="clr"></div>
                 </div>
                 <div class="b">
                    <div class="b">
                        <div class="b"></div>
                    </div>
                 </div>
            </div>
               <div id="element-box">
                <div class="t">
					<div class="t">
						<div class="t"></div>
					</div>
				</div>
                <div class="m">
				<fieldset  class="ui-widget ui-widget-content">
				<legend style="padding-left:5px;font-weight:normal;color:#666">Information</legend>	
                    <table width="100%" style="line-height:25px">
                        <tr>
                            <td width="30%" class="fontSearch" style="padding-left:20;font-weight:bold;"><label for="name">&nbsp;&nbsp;Bill No. : </label><span id="iCode" style="font-weight:normal;"></span></td>
							 <td width="70%" class="fontSearch" style="padding-left:20;font-weight:bold;">Customer Name : <span id="lblName" style="font-weight:normal;"></span></td>
						</tr>
                        <tr>
							<td width="30%" class="fontSearch" style="padding-left:20;font-weight:bold;">&nbsp;&nbsp;Sale Date : <span id="lblSaleDate" style="font-weight:normal;"></span></td>
                            <td width="70%" class="fontSearch" style="padding-left:20;font-weight:bold;">Payment Type :
								<span id="lblPayType" style="font-weight:normal;"></span>
							</td>
						</tr>
						<tr>
							<td width="30%" class="fontSearch" style="padding-left:20;font-weight:bold;">&nbsp;&nbsp;Amount : 
								<span id="iAmount" style="font-weight:normal;color:blue"></span>
							</td>
							<td width="70%" class="fontSearch" style="padding-left:20;font-weight:bold;">Discount : 
								<span id="iDiscount" style="font-weight:normal;color:blue"></span>
							</td>
						</tr>
						<tr>
							<td width="100%" colspan="2" class="fontSearch" style="padding-left:20;font-weight:bold;">&nbsp;&nbsp;Total : 
								<span id="iTotal" style="font-weight:bold;color:red"></span>
							</td>
						</tr>
                    </table>
				</fieldset>
				<p></P>
                    <table cellspacing="1" id="resultData" class=list>
                    <thead>
                       <tr>
								<th width="5%" >No.</th>
								<th style="display:none;">ID</th>		
								<th class="title" width="20%" >Product</th>
								<th  class="title" width="15%"  nowrap="nowrap">Category</th>
								<th  class="title" width="10%"  nowrap="nowrap">Type</th>
								<th  class="title" width="10%"  nowrap="nowrap">Amount</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total</th>
								<th  class="title" width="10%"  nowrap="nowrap">Discount</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total Net</th>
								<!--th  class="title" width="3%"  nowrap="nowrap"><input type="checkbox" name='chkAll'/></th-->
                      </tr>
                    </thead>
                   <tbody>
                   </tbody>
                   <tfoot>
                         <tr>
							<td colspan="8">
								<div class="boxfooter">
									 <div class="totalpage">Total : <span id="rowCount">0</span>&nbsp;&nbsp;rows</div>
									 <div id="paging_button"></div> 
								 </div>
							</td>
                         </tr>
                     </tfoot>
                    </table>
                  <div class="clr"></div>
                </div>
                 <div class="b"><div class="b"><div class="b"></div></div></div>
                 <div class="clr"></div>
                </div> <!-- elementbox-->
        </div>
    </td>
    <td width="10" id='rightboder' style="border-right:2px solid #facb0c;">&nbsp;</td>
   </tr>
</table>
 </FORM>
 <div id="dialog-confirm" title="Information">
	<p style="font-size:12px;padding-top:15px;">
	<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
		<b>Are you sure to cancel bill?</b> .
	</p>
</div>
<?php 
echo footer();
?>